package com.xyx.ssm.jdbcdao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xyx.ssm.po.WineBrand;

@Repository
public class WinebrandDao extends BaseDao {

	public int winebrandadd(WineBrand wineBrand) {

		int num = sqlSession.insert(
				"com.xyx.ssm.jdbcdao.winebrandDao.winebrandadd", wineBrand);

		return num;
	}

	public int winebrandDelete(Integer ids) {
		int num = sqlSession.delete(
				"com.xyx.ssm.jdbcdao.winebrandDao.winebranddelect", ids);

		return num;

	}
	
	public int winbrandUpdate(WineBrand wineBrand){
		int num=sqlSession.update("com.xyx.ssm.jdbcdao.winebrandDao.winebrandupdata", wineBrand);
		return num;
		
	}
	
	public List<WineBrand> winbrandId(Integer id){
		List<WineBrand> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.winebrandDao.winebrandid", id);
		return list;
		
	}
}